'use strict';
/**
 * relation model
 */
export default class extends think.model.relation {
    /**
     * init
     * @param  {} args []
     * @return {}         []
     */
    init(...args) {
        super.init(...args);

        this.relation = {
            concat: {
                type: think.model.HAS_MANY, //relation type
                model: "a_order_contact", //model name
                name: "contacts", //data name
                key: "id",
                fKey: "orderId", //forign key,
                order: "type asc"
            }
        }
    }

    getList(page){
        return this.setRelation("concat", {page: page}).countSelect();
    }

}